<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
	<iframe src="http://www.baidu.com" frameborder="0" marginheight="0" marginwidth="0"
        scrolling="auto" width="100%" height="100px" id="alarmframe" onreadystatechange="stateChangeIE(this)"
        style="display: none" onload="stateChangeFirefox(this)"></iframe>
    <div id="LoadDiv" align="center">
        <img src="http://www.cnblogs.com/Repository/Image/Loading.gif" />
    </div>
    <script type="text/javascript">
        function stateChangeIE(_frame) {
            if (_frame.readyState == "complete")//state: loading, interactive, complete 
            {
                var loader = document.getElementById("LoadDiv");
                //loader.innerHTML = "加载中";
                loader.style.display = "none";
                _frame.style.visibility = "visible";
                _frame.style.display = "block"
            }
        }
        function stateChangeFirefox(_frame) {
            var loader = document.getElementById("LoadDiv");
            //loader.innerHTML = "加载中";
            loader.style.display = "none";
            _frame.style.visibility = "visible";
            _frame.style.display = "block"
        }
        //   alarmframe.location.href = "http://www.baidu.com";
        
        http://www.jb51.net/article/22609.htm

        	http://www.cnblogs.com/beiyuu/archive/2011/07/18/iframe-tech-performance.html
        	
        		http://zhaoshg.iteye.com/blog/919285
    </script>
</body>
</html>